﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="JobEdit.aspx.cs" Inherits="Member_Job_JobEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">

    <script type="text/javascript" src="../../js/calendar.js"></script>
    <script type="text/javascript" src="../../js/JScript.js"></script>
   <div class="inkg mar_top">
    <form id="form1">
        <asp:Panel ID="pnlSucess" runat="server" Visible="False">
            <div class="itemtitle">
                你好修改成功了。
            </div>
        </asp:Panel>
        <asp:Panel ID="pnlFail" runat="server" Visible="False">
            <div class="itemtitle">
                你好修改失败了。
            </div>
        </asp:Panel>
            <strong class="inkgt">
                修改职位</strong>
        <table border="0" cellpadding="0" cellspacing="0" class="addtb">
            <thead>
                <tr>
                    <td colspan="2">
                        修改职位
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="tblt">
                        职位类别：
                    </td>
                    <td >
                        <span>
                           <select name="dropType_sel" id="dropType_sel" style=" width:104px;"  onchange="gettypelist(this.value,0)">
                    <option value="0">选择职位类别</option>
                    <%foreach (System.Data.DataRow dr in ftypeTab.Rows)
                      { %>
                    <option value="<%=dr["ID"] %>" <%=dr["ID"].ToString()==typeid?"selected":"" %>><%=dr["TypeName"] %></option>
                    <%} %>
                    
                    </select>
                    <span id="mino_type_span">
                    <%=fTypelist %>
                        </span>
                        </span>
                        <input id="dropTypeID" name="dropTypeID" type="hidden" runat="server" value="0" />
                        <input id="TypeID" name="TypeID" type="hidden" runat="server" value="0" />
                        <input id="SecTypeID" name="SecTypeID" type="hidden" runat="server" value="0" />
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        职位名称：</td>
                    <td >
                        <span>
                            <asp:TextBox ID="txtposition" runat="server"></asp:TextBox></span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtposition"
                            ErrorMessage="职位名称不能为空"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td class="tblt">
                        招聘人数：</td>
                    <td >
                        <span>
                            <asp:TextBox ID="txtcount" ToolTip="招聘人数只能是数字" runat="server" onkeypress="if(event.keyCode < 48 || event.keyCode > 57) event.returnValue = false; "
                                MaxLength="12"></asp:TextBox>
                        </span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtcount"
                            ErrorMessage="招聘人数不能为空"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td class="tblt">
                        学历要求：</td>
                    <td >
                        <span>
                            <asp:DropDownList ID="txteducation" runat="server" Width="108px">
                                <asp:ListItem Value="不限">不限</asp:ListItem>
                                <asp:ListItem Value="高中">高中</asp:ListItem>
                                <asp:ListItem Value="中技">中技</asp:ListItem>
                                <asp:ListItem Value="中专">中专</asp:ListItem>
                                <asp:ListItem Value="大专">大专</asp:ListItem>
                                <asp:ListItem Value="本科" Selected="True">本科</asp:ListItem>
                                <asp:ListItem Value="硕士">硕士</asp:ListItem>
                                <asp:ListItem Value="博士">博士</asp:ListItem>
                            </asp:DropDownList></span>
                </tr>
                <tr>
                    <td class="tblt">
                        年龄要求：
                    </td>
                    <td >
                        <span>
                            <asp:TextBox ID="txtage1" runat="server" ToolTip="年龄只能输入数字" onkeypress="if(event.keyCode < 48 || event.keyCode > 57) event.returnValue = false; "
                                MaxLength="12" Width="60px"></asp:TextBox>~
                            <asp:TextBox ID="txtage2" ToolTip="年龄只能输入数字" runat="server" onkeypress="if(event.keyCode < 48 || event.keyCode > 57) event.returnValue = false; "
                                MaxLength="12" Width="60px"></asp:TextBox></span>
                            <asp:Label ID="lblwrong" ForeColor="red" runat="server"></asp:Label>
                        
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtage1"
                            ErrorMessage="起始年龄不能为空"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="终止年龄不能为空"
                            ControlToValidate="txtage2"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        工作经验：
                    </td>
                    <td >
                        <span>
                            <asp:DropDownList ID="txtwork" runat="server" Width="108px">
                                <asp:ListItem Selected="True">无</asp:ListItem>
                                <asp:ListItem>1-3年</asp:ListItem>
                                <asp:ListItem>3-5年</asp:ListItem>
                                <asp:ListItem>5年以上</asp:ListItem>
                            </asp:DropDownList></span>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        工作性质：</td>
                    <td >
                        <span>
                            <asp:DropDownList ID="txtTemper" runat="server" Width="108px">
                                <asp:ListItem Selected="True">全职</asp:ListItem>
                                <asp:ListItem>兼职</asp:ListItem>
                                <asp:ListItem>二者都可以</asp:ListItem>
                            </asp:DropDownList></span>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        工作地点：
                    </td>
                    <td >
           <span>
                         <select id="sltP" style=" width:104px;" onchange="mino(this.options[this.selectedIndex].innerText)" >
                        </select>
 <select id="sltC" style=" width:104px; display:none">
                        </select>
 <select id="sltA" style=" width:104px; display:none" >
 </select>
						<input id="sel_p" name="sel_p" type="hidden" value="<%=mino %>" />                    <input id="sel_c" name="sel_c" type="hidden" value="<%=Request.QueryString["cid"]==null?"":Request.QueryString["cid"].ToString() %>" />                    <input id="sel_a" name="sel_a" type="hidden" value="<%=Request.QueryString["aid"]==null?"":Request.QueryString["aid"].ToString() %>" />
                    <asp:TextBox ID="txtaddress" runat="server" Visible=false></asp:TextBox>
                    <input id="minop" name="minop" type="hidden" runat="server" />
			                    <script language="javascript" type="text/javascript">
			                        var sP = document.getElementById("sltP");
			                        var sC = document.getElementById("sltC");
			                        var sA = document.getElementById("sltA");
			                        var pid = document.getElementById("sel_p").value;
			                        var cid = document.getElementById("sel_c").value;
			                        var aid = document.getElementById("sel_a").value;
			                        SetCity(sP, sC, sA, pid, cid, aid);
			                        if (document.getElementById('<%=minop.ClientID %>').value != "") { 
			                        }
                    </script>
                    </span>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        薪资水平：
                    </td>
                    <td >
                        <span>
                            <asp:DropDownList ID="dropsalary" runat="server" Width="108px">
                                <asp:ListItem Selected="True">面议</asp:ListItem>
                                <asp:ListItem>1000以下</asp:ListItem>
                                <asp:ListItem>1000-1999</asp:ListItem>
                                <asp:ListItem>2000-2999</asp:ListItem>
                                <asp:ListItem>3000-3999</asp:ListItem>
                                <asp:ListItem>4000-4999</asp:ListItem>
                                <asp:ListItem>5000-7999</asp:ListItem>
                                <asp:ListItem>8000-10000</asp:ListItem>
                                <asp:ListItem>10000以上</asp:ListItem>
                            </asp:DropDownList></span>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        性别要求：
                    </td>
                    <td >
                        <asp:DropDownList ID="dropsex" runat="server" Width="108px">
                            <asp:ListItem>不限</asp:ListItem>
                            <asp:ListItem Value="先生" Selected="True">先生</asp:ListItem>
                            <asp:ListItem Value="女士">女士</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td class="tblt">
                        外语要求：
                    </td>
                    <td >
                        <asp:DropDownList ID="dropEnlish" runat="server" Width="108px">
                            <asp:ListItem>专业</asp:ListItem>
                            <asp:ListItem>精通</asp:ListItem>
                            <asp:ListItem>熟练</asp:ListItem>
                            <asp:ListItem Selected="True">一般</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td class="tblt">
                        计算机水平：</td>
                    <td >
                        <asp:DropDownList ID="dropcomputer" runat="server" Width="108px">
                            <asp:ListItem>专业</asp:ListItem>
                            <asp:ListItem>精通</asp:ListItem>
                            <asp:ListItem>熟练</asp:ListItem>
                            <asp:ListItem Selected="True">一般</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tblt">
                        截止日期</td>
                    <td >
                        <span>
                            <asp:TextBox ID="txtenddate" onfocus="calendar()" runat="server" Width="100px"></asp:TextBox>
                        </span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtenddate"
                            ErrorMessage="截止日期不能为空"></asp:RequiredFieldValidator><asp:Label id="Lblmsgtime" runat="server" ForeColor="Red"></asp:Label></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" style="height: 45px; border-bottom: 1px #CCCCCC solid;">
                        <asp:Button ID="btnUpdate" runat="server" Text="保存" CssClass="i_button" OnClick="btnSave_Click" />
                        <asp:Button ID="btnCancel" runat="server" Text="取消" CssClass="i_button" OnClick="btnCancel_Click" />
                    </td>
                </tr>
                </tbody>
            </table>
    </form> </div>
    <script>
        window.onload = function() {
            if (document.getElementById('<%=SecTypeID.ClientID %>').value != "0") {
                gettypelist(document.getElementById('<%=TypeID.ClientID %>').value, document.getElementById('<%=SecTypeID.ClientID %>').value);
            }
        }
        
        function mino(val) {
            if (val != "") {
                document.getElementById('<%=minop.ClientID %>').value = val;
            }

        }
        function gettypelist(val, val2) {
            var minotypeid = '<%=minotypeid %>';
            var msg = Member_Job_JobEdit.getTypeList(val, val2);
            document.getElementById('mino_type_span').innerHTML = msg.value;
            if (val == "0" && minotypeid != "0" ) {
                document.getElementById('<%=dropTypeID.ClientID %>').value = minotypeid;
            }
            else {
                document.getElementById('<%=dropTypeID.ClientID %>').value = val;
            }
            if (val2 != "0") {
                document.getElementById('<%=dropTypeID.ClientID %>').value = val2;
            }
        }
        function minochangeID(val) {
            document.getElementById('<%=dropTypeID.ClientID %>').value = val;
        }
    </script>
</asp:Content>
